
#ifndef _MEMBER_BTHREAD_H_
#define _MEMBER_BTHREAD_H_

#define thread_member(thread)		((member_BThread*)((BThread*)thread)->_ptr)

#ifdef _LINUX_
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>

namespace BWE
{
	class thread_member
	{
	public:
		thread_member()
		{
			quit = false;
			sleeping = true;
			threadID = 0;
			thread = 0;
		}
		~thread_member()
		{

		}

		bool		quit;
		bool		sleeping;
		int			threadID;
		pthread_t	thread;
	};
}

#endif

#ifdef _WINDOWS_SYSTEM_
#include <Windows.h>

namespace BWE
{
	class member_BThread
	{
	public:
		member_BThread(BThread* thread)
		{
			boss = thread;
			done = false;
			sleeping = true;
			ID = 0;
			handle = 0;
			htimer = 0;
		}
		~member_BThread()
		{

		}

		BThread*	boss;
		bool		done;
		bool		sleeping;
		int			exitcode;
		DWORD		ID;
		HANDLE		handle;
		HANDLE		htimer;
	};
}
#endif

#endif
